<%@ include file="/include.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
	<base target="_self">
	<title>货物照片管理</title>
	<META HTTP-EQUIV="pragma" CONTENT="no-cache">
	<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
	<link rel="stylesheet" type="text/css" href="styles/default.css" >
	<script type="text/javascript" src="scripts/common.js"></script>
	<script type="text/javascript" src="scripts/upload.js"></script>
</head>
<body>
<form  name="GoodsImgUpload" action="GoodsImgUpload.do" enctype="multipart/form-data" method="POST">
	<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
		<caption>
			  货物图片管理
		</caption>
		<tr align="center" >
			<td><div style="background-color:#FFFFFF;border-width:1px;border-style:solid;height:330px;width:780px;overflow:auto">
				<table width="100%" border="0" cellspacing="8" cellpadding="0">
					<tr>
						<c:forEach items="${map.files}" var="file">
							<td align="center" id="tr${file.id}">
								<div>
									<%-- 
									<a href="showpic?path=upload&name=${file.fileName}"  target="_blank" title="单击打开原图!">
										<img src="showpic?path=preview&name=${file.previewImgName}" />
									</a>
									--%>
									<a href="direct/upload/${file.fileName}"  target="_blank" title="单击打开原图!">
										<img src="direct/preview/${file.previewImgName}" />
									</a>
								</div>
								<div align="center">
									备注：${file.remark}
								</div>
								<div align="center" >
									<input type="button"  value="删除" class="button" onclick="deleteGoodsImgfile(${file.id},'tr${file.id}');"/>
									</div>
								</td>
							</c:forEach>
						</tr>
					</table>
  				</div></td>
			</tr>
			<tr align="left">
				<td colspan="10" align="center"><div style="width:650px;"><b>说明：上传文件应是图片格式，限定为jpeg,jpg,gif类型，如果是其他类型请先用软件转换图像格式。
					为避免网速缓慢使传输中断，建议单个文件小于500KB，最大不超过1000KB。每个上传文件可添加备注说明文件内容。</b></div></td>
			</tr>
			<tr align="center" >
				<td><table  width="70%" border="0" cellspacing="0" cellpadding="1" style="font-size: 14px;">
						<tr align="center">
							<td >上传图片：
								<input type="file" name="file1" id="file1" style="width: 300px;"  />
							</td>
							<td align="left"><span>备注：</span>
								<input type="text" id="remark1" name="file1Remark" size="35" />
								<input type="hidden" id="imgParse1" name="file1ImgParse" />
							</td>
						</tr>
				</table></td>
		</tr>
		<tr align="center" style="height:30px;vertical-align:bottom;">
			<td>
				<input type="hidden" value="${map.goodsId}" name="goodsId">
				<input type="hidden" id="deleteFiles" name="deleteFiles" value="" />
				<input type="button" value="关闭" class="button" id="closeWin" onClick="uploadFile_closeWin();" />
				<input type="button" value="提交" class="button" id="upload" onClick="return uploadFiles();" />
			</td>
		</tr>
	</table>
</form>
</body>
</html>
